/*****************************************************************************
*
*  PROJECT:     SlipStream
*               (Loader Class)
*  LICENSE:     GNU General Public License v3 - http://www.gnu.org/licenses/gpl.html

*  DEVELOPERS:  Philip Farquharson 	<B00137077@studentmail.uws.ac.uk>
*				John Gray 			<B00145524@studentmail.uws.ac.uk>		
*				Zohaib Bhatti		<B00104280@studentmail.uws.ac.uk>
*				Euan Hislop 		<B00138636@studentmail.uws.ac.uk>
*
*****************************************************************************/
#ifndef CLOADER_H
#define CLOADER_H

#include "CSingleton.h"
#include "CTextureManager.h"
#include "CTexture.h"
#include <windows.h>
#include <GL/GL.h>

class CLoader : public CSingleton < CLoader >
{
	private:
		CTexture* m_texBackground;
		int m_iCurrentProgress, m_iDesiredProgress;
		bool m_bFading;
		HDC m_hDC;
		float m_fAlphaOffset;
		void Render ( );

	public:
		CLoader ( HDC hDC );
		~CLoader ( void ) { };

		void SetAlphaOffset ( float fOffset )						{ if (m_fAlphaOffset >= -0.7) { m_fAlphaOffset = fOffset; Render(); } }
		float GetAlphaOffset ( void )								{ return m_fAlphaOffset; }

		void SetProgress ( int iProgress )							{ m_iDesiredProgress = iProgress; Render(); }
		void IncreaseProgress ( int iProgress )						{ m_iDesiredProgress += iProgress; Render(); }
		void DecreaseProgress ( int iProgress )						{ m_iDesiredProgress -= iProgress; Render(); }
		int GetProgress ( void )									{ return m_iDesiredProgress; }
};
#endif